$(document).ajaxSuccess(function ajaxSuccessHandler(event, xhr, ajaxOptions, thrownError) {
	if($.parseJSON(xhr.responseText).success != undefined
			&& $.parseJSON(xhr.responseText).session != undefined) {
		if(!$.parseJSON(xhr.responseText).success
				&& !$.parseJSON(xhr.responseText).session) {
			location.href = '<c:url value="/login.do?method=forwardPage" />';
		}	
	}
});

/*$(document).ajaxError(function ajaxErrorHandler(event, xhr, ajaxOptions, thrownError) {
	if($.parseJSON(xhr.responseText).success != undefined
			&& $.parseJSON(xhr.responseText).session != undefined) {
		if(!$.parseJSON(xhr.responseText).success
				&& !$.parseJSON(xhr.responseText).session) {
			location.href = '<c:url value="/login.do?method=forwardPage" />';
		}	
	}
});*/